package com.atguigu.eduservice.controller;

import com.aiguigu.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @title: EduLoginController
 * @Author danghailiang
 * @Date: 2022/9/22 22:26
 * @Version 1.0
 */
//@CrossOrigin
@RestController
@RequestMapping("/eduservice/user")
public class EduLoginController {

    @PostMapping("/login")
    public R login (){
        return R.ok().data("token","admin");
    }

    @GetMapping("/info")
    public R info (){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fww4.sinaimg.cn%2Fmw690%2F005Xby3Ily1gokgx55bnvj344f5etx6u.jpg&refer=http%3A%2F%2Fwww.sina.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1666448988&t=a2fe9b21f734cbf215a4fad99a9677ed");
    }
}
